feat(copilot): add a docs-backed platform agent - #5948
Closed
j15z wants to merge 30 commits into
Closed
Conversation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Copilot can now delegate Sim product questions to a dedicated platform agent. Documented behavior is grounded in Sim's public docs, while workspace-access questions can use the live
list_user_workspacestool supplied by the focused dependency in #6227.docs/): a generated manifest synced fromapps/docs/content/docs/endefines a read-only VFS tree.globlists it,readfetches pages from docs.sim.ai, and single-pagegrepsearches within a page. Academy and API-reference remain deliberately unmounted.search_docsserver tool replacessearch_documentation: vector search supports optional page/sectionpathscoping and boundedtopK, and reports filtered-result shortfalls explicitly.search_documentationandget_platform_actionsids stay permanently chip-hidden for historical chat replay.@Docstagging remains inert: the wire context kind stays as a documented future seam, but the server continues to drop it; the platform agent uses the docs VFS andsearch_docsinstead.Depends on #6227 for the updated
list_user_workspacesresult. The companion Mothership agent consumes that result in simstudioai/mothership#371, which in turn depends on simstudioai/mothership#393.Type of Change
Testing
bun --cwd apps/sim test lib/copilot/tools/handlers/workflow/queries.test.ts lib/copilot/tools/tool-display.test.ts— 74 tests passed across this branch and its focused dependency.bun run check:api-validationpassed.bunx biome checkpassed for the changed Sim files.bun run scripts/sync-tool-catalog.ts --check --input=../mothership/copilot/contracts/tool-catalog-v1.jsonpassed.docs-manifest:checkprevents manifest drift in CI.Checklist
Screenshots/Videos
UI impact is chip text only: docs reads render as
Section/page(for example, "Read Workflows/agent") and docs searches as "Searching Sim docs for "..."".Related: simstudioai/mothership#371
Post-Deploy Monitoring & Validation
Merge and deploy #6227 and simstudioai/mothership#393 before the platform-agent PRs. For the first 24 hours after both platform PRs deploy, the Copilot/platform owner should watch request logs for
platform,list_user_workspaces, tool-not-found or denied failures, and repeated delegation. Healthy behavior is a direct workspace-list call for access and role questions, exactly one current workspace in scoped chats, and docs-backed answers for product behavior. Removing the platform allowlist entry in the companion PR disables the live lookup independently.